import request from '../utils/request'

//...... 各个axios后台调用

//登录接口
export const getLogin = (info)=>{
    return request.post("user/login", info)
}

//通过token获取用户的信息
export const getUserInfo = (info)=>{
    return request.get("user/getUserInfo")
}


//案例
export const getShowNewsDetail = (hid)=>{
    return request({
        method: 'post',
        url: 'portal/showHeadlineDetail',
        data: `hid=${hid}`
    })
}


//delete 例子
export const deleteNewsByHid = (hid)=>{
    return request({
        method: 'delete',
        url: 'headline/removeByHid',
        headers: {
            "Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
        },
        data: `hid=${hid}`
    })
}
